package de.oszimt.matse.messenger.messages;

import java.util.ArrayList;

public class ContactListMessage implements Message 
{
	private String jsonString;
	
	public ContactListMessage(ArrayList<String> contactList) 
	{
		this.jsonString = "{'type':'CONTACTS','contacts':[ ";
		for (String contact : contactList)
		{
			this.jsonString = this.jsonString + "{'name':'" + contact + "'},";
		}
		this.jsonString = this.jsonString.substring(0, this.jsonString.length() - 1) + "]}";
	}
	
	@Override
	public String getJSONString() 
	{
		return this.jsonString;
	}

	@Override
	public String getMessageType() {
		// TODO Auto-generated method stub
		return null;
	}
}
